<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta content="telephone=no" name="format-detection"/>

    <title>我的订单</title>
    <link rel="stylesheet" href="lib/layui/css/layui.css" type="text/css"/>
    <link rel="stylesheet" href="css/order.css" type="text/css"/>

</head>
<body>
<div class="container">
    <div class="layui-tab  layui-tab-brief" lay-filter="menu">
        <ul class="layui-tab-title">
            <li class="layui-this">全部</li>
            <li>待付款</li>
            <li>待收货</li>
            <li>已完成</li>
            <li>已取消</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show" data-flag="10"></div>
            <div class="layui-tab-item" data-flag="0"></div>
            <div class="layui-tab-item" data-flag="1"></div>
            <div class="layui-tab-item" data-flag="3"></div>
            <div class="layui-tab-item" data-flag="4"></div>
        </div>
    </div>
</div>
<div id="u203" class="ax_default">
    <div class="flex-box">
        <div>
            <img src="img/svg/u161.svg" alt="">
        </div>
        <div>
            <span>正在加载更多</span>
        </div>
    </div>
</div>

<script src="lib/jquery-3.4.1.min.js" type="text/javascript"></script>
<script src="lib/jquery.cookie.js" type="text/javascript"></script>
<script src="lib/layui/layui.all.js" type="text/javascript"></script>
<script src="utils/http-utils.js" type="text/javascript"></script>
<script src="js/order.js" type="text/javascript"></script>

<script>
    layui.use('element', function () {
        let element = layui.element;
        //解决tab不能响应式问题
        element.init();
        //一些事件监听
        element.on('tab(menu)', function (data) {
            let _tt = [10, 0, 1, 3, 4];
            //清空之前tab的数据
            getCurrentTab().empty();
            //重置请求参数
            resetPageParam();
            currentIndex = _tt[data.index];
            init();
        });
    });
    layer.ready(() => {
        initTab();
        init()
    });
    //检测滑动到底 加载数据
    $(window).scroll(function () {
        if ((($(window).scrollTop() + $(window).height())) === $(document).height()) {
            if (!loadingStatus) {
                init();
            }
        }
    });
</script>
</body>
</html>